/*                                    _
 *   ___ _ __ ___ _ __ ___   ___   __| |
 *  / __| '__/ __| '_ ` _ \ / _ \ / _` |
 *  \__ \ |  \__ \ | | | | | (_) | (_| |
 *  |___/_|  |___/_| |_| |_|\___/ \__,_|                                  
 *
 * |_  _ | _  _  _ _   _ _  _  _|   | _ 
 * | |(/_||_)(/_| _\  | | |(_)(_||_||(/_
 *        |                             
 */
 
#define FOR_EACH_CLIENT_COND(%1, %2)										\
	for(new %1 = CLIENT_VALID_FIRST; %1 <= CLIENT_VALID_LAST; %1++)			\
		if(%2)

#define FOR_EACH_HUMAN(%1)													\
	FOR_EACH_CLIENT_COND(%1, IsClientInGameHuman(%1))
	
#define FOR_EACH_CLIENT(%1)													\
	FOR_EACH_CLIENT_COND(%1, IsClientInGame(%1))
		
#define FOR_EACH_HUMAN_ON_TEAM(%1, %2)										\
	FOR_EACH_HUMAN(%1)														\
		if(GetClientTeam(%1) == %2)
	
#define FOR_EACH_CLIENT_ON_TEAM(%1, %2)										\
	FOR_EACH_CLIENT(%1)														\
		if(GetClientTeam(%1) == %2)
	
#define FOR_EACH_SURVIVOR_HUMAN(%1)												\
	FOR_EACH_HUMAN_ON_TEAM(%1, L4D2Team_Survivors)
	
#define FOR_EACH_SURVIVOR(%1)												\
	FOR_EACH_CLIENT_ON_TEAM(%1, L4D2Team_Survivors)
	
#define FOR_EACH_INFECTED_HUMAN(%1)												\
	FOR_EACH_HUMAN_ON_TEAM(%1, L4D2Team_Infected)
	
#define FOR_EACH_INFECTED(%1)												\
	FOR_EACH_CLIENT_ON_TEAM(%1, L4D2Team_Infected)
	
#define FOR_EACH_SPECTATOR(%1)												\
	FOR_EACH_HUMAN_ON_TEAM(%1, L4D2Team_Spectate)